<!doctype html>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<script src="../../assert_selection.js"></script>
<script>
if (window.internals)
  internals.settings.setEditingBehavior('win');

selection_test(
  '<div contenteditable dir="ltr">|אבצ דעפ היח    abc def hij</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr">\u05D0\u05D1\u05E6 |\u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    abc def hij</div>',
  '11-0 right word');

selection_test(
  '<div contenteditable dir="ltr">א|בצ דעפ היח    abc def hij</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr">\u05D0\u05D1\u05E6 |\u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    abc def hij</div>',
  '11-1 right word');

selection_test(
  '<div contenteditable dir="ltr">אב|צ דעפ היח    abc def hij</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr">\u05D0\u05D1\u05E6 |\u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    abc def hij</div>',
  '11-2 right word');

selection_test(
  '<div contenteditable dir="ltr">אבצ| דעפ היח    abc def hij</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr">\u05D0\u05D1\u05E6 |\u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    abc def hij</div>',
  '11-3 right word');

selection_test(
  '<div contenteditable dir="ltr">אבצ |דעפ היח    abc def hij</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr">\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 |\u05D4\u05D9\u05D7    abc def hij</div>',
  '11-4 right word');

selection_test(
  '<div contenteditable dir="ltr">אבצ ד|עפ היח    abc def hij</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr">\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 |\u05D4\u05D9\u05D7    abc def hij</div>',
  '11-5 right word');

selection_test(
  '<div contenteditable dir="ltr">אבצ דע|פ היח    abc def hij</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr">\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 |\u05D4\u05D9\u05D7    abc def hij</div>',
  '11-6 right word');

selection_test(
  '<div contenteditable dir="ltr">אבצ דעפ| היח    abc def hij</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr">\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 |\u05D4\u05D9\u05D7    abc def hij</div>',
  '11-7 right word');

selection_test(
  '<div contenteditable dir="ltr">אבצ דעפ |היח    abc def hij</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr">\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7 |   abc def hij</div>',
  '11-8 right word');

selection_test(
  '<div contenteditable dir="ltr">אבצ דעפ ה|יח    abc def hij</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr">\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7 |   abc def hij</div>',
  '11-9 right word');

selection_test(
  '<div contenteditable dir="ltr">אבצ דעפ הי|ח    abc def hij</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr">\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7 |   abc def hij</div>',
  '11-10 right word');

selection_test(
  '<div contenteditable dir="ltr">אבצ דעפ היח|    abc def hij</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr">\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7 |   abc def hij</div>',
  '11-11 right word');

selection_test(
  '<div contenteditable dir="ltr">אבצ דעפ היח |   abc def hij</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr">אבצ דעפ היח    abc |def hij</div>',
  '11-12 right word');

selection_test(
  '<div contenteditable dir="ltr">אבצ דעפ היח  |  abc def hij</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr">אבצ דעפ היח    abc |def hij</div>',
  '11-13 right word');

selection_test(
  '<div contenteditable dir="ltr">אבצ דעפ היח   | abc def hij</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr">אבצ דעפ היח    abc |def hij</div>',
  '11-14 right word');

selection_test(
  '<div contenteditable dir="ltr">אבצ דעפ היח    |abc def hij</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr">אבצ דעפ היח    abc |def hij</div>',
  '11-15 right word');

selection_test(
  '<div contenteditable dir="ltr">אבצ דעפ היח    a|bc def hij</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr">אבצ דעפ היח    abc |def hij</div>',
  '11-16 right word');

selection_test(
  '<div contenteditable dir="ltr">אבצ דעפ היח    ab|c def hij</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr">אבצ דעפ היח    abc |def hij</div>',
  '11-17 right word');

selection_test(
  '<div contenteditable dir="ltr">אבצ דעפ היח    abc| def hij</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr">\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    abc |def hij</div>',
  '11-18 right word');

selection_test(
  '<div contenteditable dir="ltr">אבצ דעפ היח    abc |def hij</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr">אבצ דעפ היח    abc def |hij</div>',
  '11-19 right word');

selection_test(
  '<div contenteditable dir="ltr">אבצ דעפ היח    abc d|ef hij</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr">אבצ דעפ היח    abc def |hij</div>',
  '11-20 right word');

selection_test(
  '<div contenteditable dir="ltr">אבצ דעפ היח    abc de|f hij</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr">אבצ דעפ היח    abc def |hij</div>',
  '11-21 right word');

selection_test(
  '<div contenteditable dir="ltr">אבצ דעפ היח    abc def| hij</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr">\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    abc def |hij</div>',
  '11-22 right word');

selection_test(
  '<div contenteditable dir="ltr">אבצ דעפ היח    abc def |hij</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr">אבצ דעפ היח    abc def hij|</div>',
  '11-23 right word');

selection_test(
  '<div contenteditable dir="ltr">אבצ דעפ היח    abc def h|ij</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr">אבצ דעפ היח    abc def hij|</div>',
  '11-24 right word');

selection_test(
  '<div contenteditable dir="ltr">אבצ דעפ היח    abc def hi|j</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr">אבצ דעפ היח    abc def hij|</div>',
  '11-25 right word');

selection_test(
  '<div contenteditable dir="ltr">אבצ דעפ היח    abc def hij|</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr">אבצ דעפ היח    abc def hij|</div>',
  '11-26 right word');
</script>
